use chrono::{DateTime, Utc};

use grpc_server::State;

pub struct StateTime {
    state: State,
    time: DateTime<Utc>,
}

impl StateTime {
    pub fn new(state: State) -> Self {
        Self {
            state,
            time: Utc::now(),
        }
    }

    pub fn state(&self) -> State {
        self.state
    }

    pub fn time(&self) -> DateTime<Utc> {
        self.time
    }
}
